<?php
/**
 * Author: hades
 * DateTime: 2020/5/16 16:53
 */

namespace App\Validate;


class GoodsValidate extends Validate {
    private $rule = [
        'name' => 'required|string|max:20',
        'carousel' => 'required|string|max:400',
        'bewrite' => 'required|string|max:480',
    ];

    /**
     * 添加验证
     * @return string[]
     */
    public function add() {
        $this->rule['cid'] = 'required|string|nullable';
        return $this->rule;
    }

    /**
     * 修改验证
     * @return string[]
     */
    public function modify() {
        return $this->rule;
    }
}
